<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<div id="registUserCountPie" style="width: 100%; height: 400px;"></div>
<script type="text/javascript">
	using('echarts', function() {
		var $tab = $navTab.focus(), $registUserCountPie = $('#registUserCountPie', $tab);
		var	ruChart = echarts.init($registUserCountPie[0]);
		// 指定图表的配置项和数据
		var ruOption = {
			    tooltip : {
			        trigger: 'axis',
			        axisPointer : {            // 坐标轴指示器，坐标轴触发有效
			            type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
			        }
			    },
			    legend: {
			        data: ['总部注册人数', '下属企业注册人数']
			    },
			    grid: {
			        left: '3%',
			        right: '4%',
			        bottom: '3%',
			        containLabel: true
			    },
			    xAxis:  {
			        type: 'value'
			    },
			    yAxis: {
			        type: 'category',
			        data: function() {
			        	var res = [];
			        	for(var i = 1; i <= 12; i ++) {
			        		res.push(i + '月');
			        	}
			        	return res;
			        } ()
			    },
			    series: [
			        {
			            name: '总部注册人数',
			            type: 'bar',
			            stack: '总量',
			            label: {
			                normal: {
			                    show: true,
			                    position: 'insideRight'
			                }
			            },
			            data: <ww:property value="axisX1" />
			            //data: [1,3,'-',6,3,2,10,7,1,'-','-','-']
			            //data: ['-','-','-',9,1,'-',27,11,7,3,1,7]
			        },
			        {
			            name: '下属企业注册人数',
			            type: 'bar',
			            stack: '总量',
			            label: {
			                normal: {
			                    show: true,
			                    position: 'insideRight'
			                }
			            },
			            data: <ww:property value="axisX2" />
			            // data: [3,'-',4,'-','-','-',174,19,38,'-','-','-']
			            //data: ['-','-','-',2,3,'-','-',34,'-',42,'-',1212]
			        }
			    ]
			};

		// 使用刚指定的配置项和数据显示图表。
		ruChart.setOption(ruOption);

		$registUserCountPie.resize(function() {
			ruChart.resize(ruOption);
		});
	});
</script>
